function request(params) {
	return new Promise((resolve, reject) => {
		uni.showLoading({
				title: "加载中"
			}),
			uni.request({
				...params,
				success: ({
					data
				}) => {
					resolve(data);
				},
				fail: (res) => {
					console.log(res);
				},
				complete: () => {
					uni.hideLoading();
				}
			})
	})
}

export default request;
